<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style:none;
        }
        .top ul {
            overflow: hidden;
        }
        .top ul li {
            float: left;
            margin-right: 50px;
        }
        .bottom {
            height: 450px;
            width: 1000px;
        }
        .bottom img{
            display:block;
            margin: 100px auto;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="top">
            <ul>
                <li><a href="images/1.jpg"><img src="images/1-small.jpg" alt=""></a></li>
                <li><a href="images/2.jpg"><img src="images/2-small.jpg" alt=""></a></li>
                <li><a href="images/3.jpg"><img src="images/3-small.jpg" alt=""></a></li>
                <li><a href="images/4.jpg"><img src="images/4-small.jpg" alt=""></a></li>
            </ul>
        </div>
        <div class="bottom">
            <img src="images/placeholder.png" alt="" width='400px' height = '250px'>
        </div>
    </div>
    <script>
        //获取元素
        var aList = document.querySelectorAll('.top a');
        var img = document.querySelector('.bottom img');

        //注册事件
        for(var i = 0; i < aList.length; i++){
            aList[i].onclick = aClick;
        }
        function aClick() {
            img.src = this.href;
            return false;
        }
    </script>
    <script src="../jquery-1.12.4.js"></script>
    <script>
        // $(function(){
        //     $('.top a').on('click',function(e){
        //         $('.bottom img').attr('src',$(this).attr('href'))
        //         e.preventDefault()
        //     })
        // })
    </script>
</body>
</html>